package com.jin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jin.entity.ProductInfo;
import com.jin.dto.CartDTO;

import java.util.List;

/**
 * @author JJLiu
 * @create 2021-07-16 14:31
 **/
public interface ProductService {

    ProductInfo findOne(String productId);

    List<ProductInfo> findUpAll();

    IPage<ProductInfo> findAll(Page<ProductInfo> page);

    int save(ProductInfo productInfo);

    //加库存
    void increaseStock(List<CartDTO> cartDTOList);

    //减库存
    void decreaseStock(List<CartDTO> cartDTOList);
}
